package com.wbz.create.single;

/**
 * 静态内部类
 * 静态内部类是一种既保证线程安全又延迟加载的方法。
 */
public class SingletonStaticInnerClass {
    private SingletonStaticInnerClass() {
    }

    private static class SingletonHolder {
        private static final SingletonStaticInnerClass INSTANCE = new SingletonStaticInnerClass();
    }

    public static SingletonStaticInnerClass getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
